package org.strongme.modules.project.entity;

import org.strongme.common.util.excel.annotation.ExcelField;
import org.strongme.modules.sys.utils.DictUtils;
import org.strongme.util.StringUtils;

import java.text.NumberFormat;

public class TzTj {
	private static  final java.text.DecimalFormat   df   =new   java.text.DecimalFormat("#.00");

	private String xh;
	private String gcmc;
	private String sgdw;
	private String dwgc;
	private String gxh;
	private String jcff;
	private Integer hks;
	private Integer bhghks;
	private Double ychkhgl;
	private Integer ycppsl;
	private Integer ycbhgps;
	private Integer bhgpsl;
	private Double ycpphgl;
	private Integer ktksl;
	private Integer kthgsl;
	private Integer jccd;
	private String sxy;

	@ExcelField(title="施工单位", align=2, sort=2)
	public String getSgdw() {
		return sgdw;
	}
	public void setSgdw(String sgdw) {
		this.sgdw = sgdw;
	}
	@ExcelField(title="单位工程", align=2, sort=3)
	public String getDwgc() {
		return dwgc;
	}
	public void setDwgc(String dwgc) {
		this.dwgc = dwgc;
	}
	@ExcelField(title="管线（设备）编号", align=2, sort=4)
	public String getGxh() {
		return gxh;
	}
	public void setGxh(String gxh) {
		this.gxh = gxh;
	}
	@ExcelField(title="检测方法", align=2, sort=5)
	public String getJcff() {
		if(jcff!=null&&!"".equals(jcff)) {
			return DictUtils.getDictLabel(jcff, "dict_jcff", "");
		} else {
			return "未输入";
		}
	}
	public void setJcff(String jcff) {
		this.jcff = jcff;
	}
	@ExcelField(title="检验焊口数量", align=2, sort=7)
	public Integer getHks() {
		return hks;
	}
	public void setHks(Integer hks) {
		this.hks = hks;
	}
	@ExcelField(title="不合格焊口数量", align=2, sort=8)
	public Integer getBhghks() {
		return bhghks;
	}
	public void setBhghks(Integer bhghks) {
		this.bhghks = bhghks;
	}
	@ExcelField(title="一次焊口合格率", align=2, sort=9)
	public String getYchkhgl() {
		return df.format(ychkhgl*100)+"%";
	}
	public void setYchkhgl(Double ychkhgl) {
		this.ychkhgl = ychkhgl;
	}
	
	@ExcelField(title="一次拍片数量", align=2, sort=10)
	public Integer getYcppsl() {
		return ycppsl;
	}
	public void setYcppsl(Integer ycppsl) {
		this.ycppsl = ycppsl;
	}
	@ExcelField(title="不合格片数量", align=2, sort=11)
	public Integer getBhgpsl() {
		return bhgpsl;
	}
	public void setBhgpsl(Integer bhgpsl) {
		this.bhgpsl = bhgpsl;
	}
	@ExcelField(title="一次拍片合格率", align=2, sort=12)
	public String getYcpphgl() {

		return df.format(ycpphgl*100)+"%";
	}
	public void setYcpphgl(Double ycpphgl) {
		this.ycpphgl = ycpphgl;
	}
	@ExcelField(title="扩探口数量", align=2, sort=13)
	public Integer getKtksl() {
		return ktksl;
	}
	public void setKtksl(Integer ktksl) {
		this.ktksl = ktksl;
	}
	@ExcelField(title="扩探合格数量", align=2, sort=14)
	public Integer getKthgsl() {
		return kthgsl;
	}
	public void setKthgsl(Integer kthgsl) {
		this.kthgsl = kthgsl;
	}
	@ExcelField(title="检测长度（m）", align=2, sort=15)
	public Integer getJccd() {
		return jccd;
	}
	public void setJccd(Integer jccd) {
		this.jccd = jccd;
	}
	public String getGcmc() {
		return gcmc;
	}
	public void setGcmc(String gcmc) {
		this.gcmc = gcmc;
	}
	
	@ExcelField(title="序号", align=2, sort=1)
	public String getXh() {
		return xh;
	}
	public void setXh(String xh) {
		this.xh = xh;
	}

	@ExcelField(title="一次不合格片数", align=2, sort=10)
	public Integer getYcbhgps() {
		return ycbhgps;
	}

	public void setYcbhgps(Integer ycbhgps) {
		this.ycbhgps = ycbhgps;
	}

	@ExcelField(title="射线源", align=2, sort=6)
	public String getSxy() {
		//γ
		if(StringUtils.isNotBlank(sxy) && sxy.contains("&gamma;")) {
			sxy = sxy.replaceAll("&gamma;","γ");
		}
		return sxy;
	}

	public void setSxy(String sxy) {
		this.sxy = sxy;
	}
}
